/*
* created by Administrator on 2018/12/3
* 好的代码像粥一样,是得用时间和精力熬的。
*/
const mongoose = require('mongoose');
let connect = (app) => {
    //连接到数据库
    mongoose.connect('mongodb://localhost:27017/myApp')
        .then( () => { app.listen(8080, () => console.log('端口在8080上运行'));})
};
module.exports = connect;
